//
//  TreeNode.swift
//  Swift-Learning-Demo
//
//  Created by yuan xiaodong on 2021/1/6.
//  Copyright © 2021 yuan. All rights reserved.
//

import Foundation

public class TreeNode {
 public var val: Int
  public var left: TreeNode?
  public var right: TreeNode?
  public init() { self.val = 0; self.left = nil; self.right = nil; }
  public init(_ val: Int) { self.val = val; self.left = nil; self.right = nil; }
  public init(_ val: Int, _ left: TreeNode?, _ right: TreeNode?) {
      self.val = val
      self.left = left
      self.right = right
  }
}
 
